package com.example.hibernate.m.session;

import org.hibernate.Session;
import org.junit.Test;

import com.example.hibernate.utils.HibernateUtils;

public class TestApp {
	
	@Test
	public void testSave(){
		
		Person person = new Person();
		person.setIsMan(true);
		person.setName("aaa");
		person.setIsGood(true);
		
		Session session = HibernateUtils.openSession();
		session.beginTransaction();
		
		session.save(person);
		
		session.getTransaction().commit();
	}
}
